const state = {
    guageChartProperties: {
        // 设置背景色
        backgroundColor: "#ffffff",
        tooltip: {
          formatter: "{a} <br/>{c} {b}"
        },
        toolbox: {
          show: true,
          feature: {
            mark: { show: true },
            restore: { show: true },
            saveAsImage: { show: true }
          }
        },
        series: [
          {
            name: "速度",
            type: "gauge",
            min: 0,
            max: 180,
            splitNumber: 10,
            radius: "50%",
            axisLine: {
              // 仪表盘外围的样式设置
              lineStyle: {
                // 属性lineStyle控制线条样式
                color: [[0.15, "lime"], [0.85, "#1e90ff"], [1, "#ff4500"]],
                width: 3,
                shadowColor: "#fff", //默认透明
                shadowBlur: 10
              }
            },
            // 坐标轴标签样式
            axisLabel: {
              textStyle: {
                // 属性lineStyle控制线条样式
                fontWeight: "bolder",
                color: "#000",
                shadowColor: "#fff", //默认透明
                shadowBlur: 10
              }
            },
            // 坐标轴小刻度线
            axisTick: {
              length: 15, // 属性length控制线长
              lineStyle: {
                // 属性lineStyle控制线条样式
                color: "auto",
                shadowColor: "#fff", //默认透明
                shadowBlur: 10
              }
            },
            splitLine: {
              // 控制刻度与刻度数的距离
              length: 20, // 属性length控制线长
              lineStyle: {
                // 属性lineStyle（详见lineStyle）控制线条样式
                width: 3,
                color: "#auto",
                shadowColor: "#fff", //默认透明
                shadowBlur: 10
              }
            },
            pointer: {
              // 分隔线
              shadowColor: "#fff", //默认透明
              shadowBlur: 5
            },
            // 仪表盘的标题样式
            title: {
              textStyle: {
                // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                fontWeight: "bolder",
                fontSize: 20,
                // fontStyle: "italic",
                color: "#000",
                shadowColor: "#fff", //默认透明
                shadowBlur: 10
              }
            },
            // 表示的是仪表盘中数值部分的样式设置
            detail: {
              backgroundColor: "rgba(30,144,255,0)",
              borderWidth: 1,
              borderColor: "#fff",
              shadowColor: "#fff", //默认透明
              shadowBlur: 5,
              offsetCenter: [0, "50%"], // x, y，单位px
              textStyle: {
                // 其余属性默认使用全局文本样式，详见TEXTSTYLE
                fontWeight: "bolder",
                color: "#000",
                fontSize: 20
              }
            },
            data: [{name: 'COD', value: 4}]
          }
        ]
    }
}

const getters = {
    getGuageChartProperties: state => state.guageChartProperties
}

const mutations = {
    insertGuage: function(state, item) {
    },
    setGuage: (state, item) => {
    }
}

const actions = {
    addGuage: function(state, item) {
        state.commit('insertGuage', item)
    }
}

export default {
    state, getters, mutations, actions
}